package com.atguigu.gmall_sugar.mapper;

import com.atguigu.gmall_sugar.bean.ProvinceStats;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName: ProvinceStatsMapper
 * @Description:
 * @Author: kele
 * @Date: 2021/4/29 11:26
 **/
@Mapper
public interface ProvinceStatsMapper {

    @Select("select   " +
            " province_name, " +
            " sum(order_amount) order_amount," +
            " sum(order_count) order_count " +
            "from province_stats_2021 " +
            "where toYYYYMMDD(stt)=#{date} " +
            "group by province_name "
    )
    List<ProvinceStats> getProvinceStatsByName(int date);

}
